﻿<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeBehind="MassHonourEdit.aspx.cs" Inherits="ZHDJ.BranchCenter.Module.MassLine.MassHonourEdit" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    
</head>
<body >
    <form id="form1" runat="server" style="background-color: #0000FF" onsubmit="return UESync();">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server">
            <Items>

                <f:Form BodyPadding="10px" ID="Form2"
                    runat="server" Title="" ShowBorder="false" ShowHeader="false">
                    <Rows>
                        <f:FormRow>
                            <Items>
                                <f:TextBox ID="txtTitle" runat="server" LabelAlign="right" Label="标题" Required="true" ShowRedStar="true" RequiredMessage="请填写标题">
                                </f:TextBox>
                            </Items>

                        </f:FormRow>
                       
                        <f:FormRow>
                            <Items>
                                <f:FileUpload runat="server" LabelAlign="right" EmptyText="请选择一张图片" ID="filePhoto" ShowRedStar="false"
                                    Label="上传图片"
                                    ButtonText="图片" Required="false" ButtonIcon="ImageAdd"
                                    AutoPostBack="true" OnFileSelected="filePhoto_FileSelected" AcceptFileTypes="image/*">
                                </f:FileUpload>

                            </Items>

                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                              
                           <f:HyperLinkImagePreview runat="server" ID="HyperLink1"  CssStyle="cursor:pointer" 
                                ShowEmptyLabel="true" LabelAlign="right" Text="查看图片"></f:HyperLinkImagePreview>
                                 </Items>

                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:TextArea ID="txtSummary" LabelAlign="right" Label="简介" runat="server">
                                </f:TextArea>
                            </Items>

                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:RadioButtonList ID="rblFlags" LabelAlign="right" runat="server" Label="置顶格式" Width="230px">
                                </f:RadioButtonList>

                            </Items>

                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:CheckBox ID="cbxEnabled" runat="server" Label="是否发布" LabelAlign="right">
                                </f:CheckBox>
                            </Items>
                        </f:FormRow>
                        <f:FormRow>
                            <Items>
                                <f:ContentPanel ID="ContentPanel1" runat="server" ShowBorder="false" ShowHeader="false">
                                    <script type="text/plain" id="editor"></script>
                                </f:ContentPanel>
                            </Items>

                        </f:FormRow>
                    </Rows>
                </f:Form>


            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="Form2" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
        <f:HiddenField Text="" ID="hdFileId" runat="server"></f:HiddenField>
       
    </form>
</body>
</html>
<script src="../../../../Resource/ueditor/ueditor.config.js"></script>
<script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>

<script>
    var editor;
    var editorContent = '<%=EditorContent%>';
    var containerClientID = '<%= ContentPanel1.ClientID %>';
    F.ready(function () {


        editor = UE.getEditor("editor", {
            initialFrameWidth: '100%',
            initialFrameHeight: '180',
            enableAutoSave: false,
            saveInterval: 1000000,
            elementPathEnabled: false,
            autoHeightEnabled: false,
            onready: function () {
                // 重新布局外部容器
                F(containerClientID).updateLayout();
            }
        });

        editor.ready(function () {
            if (editorContent) {
                editor.setContent(editorContent);
            }
        });
    });

    function UESync() {
        var editor = UE.getEditor('editor')
        editor.sync();
        return true;
    }

    // 更新编辑器内容
    //function updateEditor(content) {
    //    if (editor && editor.isReady) {
    //        editor.setContent(content);
    //    }
    //}
</script>
